#!/usr/bin/env bash

# This command can be run by the user to clang-format everything.

PLATFORM=$(uname)
TOOLSPATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
CLANGFORMAT="${TOOLSPATH}/${PLATFORM}/clang-format -style=file"

find include src tests/src tools \( -name '*.cpp' -o -name '*.h' -o -name '*.inl' \) -not -name pugi* -print0 | xargs -n1 -0 ${CLANGFORMAT} -i
